import { App } from 'vue';
import { registerPanelItemProvider } from '@ibiz-template/runtime';
import { withInstall } from '@ibiz-template/vue3-util';
import { FilterConditionProvider } from './provider';
import { FilterCondition } from './filter-condition';

export const IBizFilterCondition = withInstall(
  FilterCondition,
  function (v: App) {
    v.component(FilterCondition.name, FilterCondition);
    registerPanelItemProvider(
      'LIST_ITEMRENDER_FILTER_CONDITION',
      () => new FilterConditionProvider(),
    );
  },
);
